<template>
  <a-modal
    class="commonModal"
    :title="titleModal"
    :visible="visibleModal"
    @ok="handleOk"
    @cancel="handleCancel"
    :width="widthModal"
    okText="确认"
    cancelText="取消"
    centered
  >
    <slot></slot>
  </a-modal>
</template>
<script>
export default {
  name: "commonModal",
  props: {
    titleModal: {
      type: String,
      default: ""
    },
    visibleModal: {
      type: Boolean,
      default: false
    },
    widthModal: {
      type: Number,
      default: 500
    }
  },
  data() {
    return {};
  },
  methods: {
    handleOk() {
      this.$emit("handleOk");
    },
    handleCancel() {
      this.$emit("handleCancel");
    }
  }
};
</script>
<style lang="less">
// .commonModal {
// }
</style>